<template>
  <div id="tes">
   son<input type="text" v-model="name" @input="call"><input type="button" @click="test" value="test">
  </div>
</template>

<script>
export default {
  props: ["name"],
  data() {
    return {
      sonName:this.name
    }
  },
 watch:{
    name:function(newValue,oldValue){
            this.sonName=newValue;
    }
  },
  methods: {
    test:function(){
    },
    call(){
      this.$emit("callFather",this.sonName);
    }
  }
 
};
</script>
